{% extends 'layout.twig' %}

{% block content %}
        <div class="col-sm-offset-3 col-sm-6 add-video">
            <div id="message" class="alert alert-info hidden"></div>
            <div class="panel panel-primary">
                <div class="panel-heading">上传视频</div>
                <div class="panel-body">
                    <form id="upload-form" class="form-horizontal" role="form" onsubmit="return false">
                        <div id="video-name" class="form-group hidden">
                            <label for="name" class="col-sm-3 control-label">视频名字： </label>
                            <div class="col-sm-9">
                                <input id="name" name="name" type="text" class="form-control"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="name" class="col-sm-3 control-label">视频： </label>
                            <div class="col-sm-9">
                                <a id="upload-btn" href="javascript:;" class="btn btn-default">上传</a>
                            </div>
                            <div id="progress" class="col-sm-9 hidden">
                                <div class="row">
                                    <div class="col-sm-12">
                                        <div class="progress">
                                            <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 0%">
                                                <span>0% Complete (success)</span>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                            </div>
                        </div>
                        <div id="thumb" class="form-group hidden">
                            <label for="name" class="col-sm-3 control-label">封面： </label>
                            <div class="col-sm-9">
                                <img src="" alt="封面" class="img-thumbnail"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-3 col-sm-9">
                                <button id="submit_btn"  class="btn btn-primary hidden">添加</button>
                            </div>
                        </div>
                        <input type="hidden" name="path"/>
                        <input type="hidden" name="format"/>
                        <input type="hidden" name="time"/>
                        <input type="hidden" name="poster"/>
                        <input type="hidden" name="duration"/>
                    </form>
                </div>
                <div class="panel-footer">仅支持mp4格式的视频，转格式请注意编码格式必须是AVC(H264) </div>
            </div>
        </div>
{% endblock %}

{% block footer %}
	<script type="text/javascript" src="/socket.io/socket.io.js"></script>
    <script type="text/javascript" src="/lib/resumable.js"></script>
    <script type="text/javascript" src="/js/add_video.js"></script>
{% endblock %}